package com.ymk.service.impl;

import com.ymk.base.mybatis.DaoRouter;
import com.ymk.base.mybatis.Pagination;
import com.ymk.bo.member.MemberBO;
import com.ymk.service.IMemberService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;
/**
 * <p>
 * 会员表 服务实现类
 * </p>
 *
 * @author 莫参商
 * @since 2023-05-05
 */
@Service
public class MemberService implements IMemberService {

    @Override
    public MemberBO get(Map param) {
    return this.daoRouter.queryForObject("Member.loadMember",param);
    }

    @Override
    public List<MemberBO> list(Map param) {
        return this.daoRouter.query("Member.loadMember",param);
    }

    @Override
    public List<MemberBO> listForPage(Pagination pagination) {
        return this.daoRouter.query("Member.loadMemberForPage",pagination);
    }

    @Override
    public void post(MemberBO param) {
        this.daoRouter.insert("AMember.insertMember",param);
    }

    @Override
    public void update(MemberBO param) {
        this.daoRouter.update("AMember.updateMember",param);
    }

    @Override
    public void del(MemberBO param) {
        this.daoRouter.update("AMember.delMember",param);
    }

    @Autowired
    private DaoRouter daoRouter;

}
